Skip to content

Fix the egress results serialization format#1521

Merged
biglittlebigben merged 2 commits intomainfrom
benjamin/egress_obs_results
Apr 29, 2026
Merged

Fix the egress results serialization format#1521
biglittlebigben merged 2 commits intomainfrom
benjamin/egress_obs_results

Conversation

@biglittlebigben
Copy link
Copy Markdown
Contributor

Only serialize in the non deprecated format so no "ResultType" field is needed.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 29, 2026

🦋 Changeset detected

Latest commit: 86da3e6

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "github.com/livekit/protocol" specified in the `fixed` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

FileResults []*livekit.FileInfo `json:"file_results,omitempty"`
StreamResults []*livekit.StreamInfo `json:"stream_results,omitempty"`
SegmentResults []*livekit.SegmentsInfo `json:"segment_results,omitempty"`
ImageResults []*livekit.ImagesInfo `json:"image_results,omitempty"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this currently snake case? what consumes this? does this break backward compatibility?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was currently not working because:

  1. cloud-api-server tries to parse the content of this field as if were in the same format as the analytics corresponding field
  2. egress is serializing this in different formats depending on the type of result without actually indicating what the type is

See https://linear.app/livekit/issue/CS-1673/v3-egress-missing-data-points

I can change the schema to write to a new column if you want to somehow keep compatibility with the data that's currently in the "result" column. Do we need to considering the context above?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backward compatibility with the existing data isn't important but the way api server is parsing this is sketchy...

Updated egress results serialization format for better compatibility.
@biglittlebigben biglittlebigben merged commit 94baa15 into main Apr 29, 2026
7 checks passed
@biglittlebigben biglittlebigben deleted the benjamin/egress_obs_results branch April 29, 2026 20:05
This was referenced Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants